// 农户管理 下面农户列表
import request from '@/utils/request'
// 查询排班列表
export function listCrop(query) {
  return request({
    url: '/crop/plan/list',
    method: 'get',
    params: query
  })
}

// 查询排班详细
export function getPlan(planId) {
  return request({
    url: '/crop/plan/getPlan?planId='+ planId,
    method: 'get'
  })
}

// 新增排班
export function addCrop(data) {
  return request({
    url: '/crop/plan/',
    method: 'post',
    data: data
  })
}

// 修改排班
export function updateCrop(data) {
  return request({
    url: '/crop/plan',
    method: 'put',
    data: data
  })
}

// 删除排班

export function delCrop(ids) {
  return request({
    url: '/crop/plan/' + ids,
    method: 'delete'
  })
}



//查找轮班类型
export function AroundLists(data) {
  return request({
    url: '/crop/plan/AroundLists',
    method: 'get',
    data:data
  })
}


//自动生成编码
export function selectMaterialCode() {
  return request({
    url: '/crop/plan/selectMaterialCode',
    method: 'get'
  })
}
//班组列表
export function MarketList(query) {
  return request({
    url: '/crop/plan/MarketList',
    method: 'get',
    params:query
  })
}

//查找轮班类型
export function successBan(data) {
  return request({
    url: '/crop/plan/successBan',
    method: 'post',
    data:data
  })
}
